home *** CD-ROM | disk | FTP | other *** search
/ PC World Interactive 7 / PC World Interactive 7.iso / program / cprog.EXE / CC_1.ZIP / DOSCALL.H < prev    next >
Text File  |  1987-06-03  |  5KB  |  115 lines

  1. /*
  2. ** include doscall.h -- defines for DOS function calls
  3. */
  4.  
  5.  
  6. /*
  7. ** DOS function call codes
  8. */
  9.  
  10. #define F_KBDECH       1
  11. #define F_DSPOUT       2
  12. #define F_PRNOUT       5
  13. #define F_DIRECH       6
  14. #define F_DIRNOE       7
  15. #define F_KBDNOE       8
  16. #define F_BUFKBD       10
  17. #define F_OPEN         15
  18. #define F_CLOSE        16
  19. #define F_SEARCH       17
  20. #define F_CREATE       22
  21. #define F_SETDTA       26
  22. #define F_READ         39
  23. #define F_WRITE        40
  24. #define F_GDATE        42
  25. #define F_GTIME        44
  26.  
  27.  
  28. /*
  29. ** DOS FCB structure
  30. */
  31.  
  32. #define FCBSIZE        59      /* includes 7-byte FCB extension
  33.                                ** and 15-byte non-DOS postfix
  34.                                */
  35. /* DOS FCB extension begins here */
  36. #define FCB_FLAG       0       /* 000H -- not allocated
  37.                                ** 080H -- KBD
  38.                                ** 040H -- SCRN
  39.                                ** 0C0H -- CON
  40.                                ** 020H -- PRN
  41.                                ** 010H -- ASYNC
  42.                                ** 002H -- READ
  43.                                ** 001H -- WRITE
  44.                                ** 0FFH -- disk FCB (extended)
  45.                                ** others -- device FCB (simulated)
  46.                                */
  47. #define FCB_ATTR       6       /* file creation attributes
  48.                                ** 02H -- hidden
  49.                                ** 04H -- system
  50.                                ** 06H -- both
  51.                                */
  52. /* standard DOS FCB begins here */
  53. #define FCB_DRIVE      7       /* DOS drive number
  54.                                ** 0 - default drive
  55.                                ** 1 - drive A
  56.                                ** 2 - drive B
  57.                                */
  58. #define FCB_FILE       8       /* file name
  59.                                */
  60. #define FCB_EXTEN      16      /* file name extension
  61.                                */
  62. #define FCB_BLOCK      19      /* block number (unused)
  63.                                */
  64. #define FCB_LRECL      21      /* logical record size (always 1)
  65.                                */
  66. #define FCB_FSIZE      23      /* file size in bytes (set by DOS)
  67.                                */
  68. #define FCB_FDATE      27      /* date of last update (set by DOS)
  69.                                */
  70. #define FCB_SRECNO     39      /* record number within block (unused)
  71.                                */
  72. #define FCB_RRECNO     40      /* record number relative to beginning of file
  73.                                ** when LRECL is 1, this value is byte position
  74.                                */
  75. /* non-DOS extension begins here */
  76. #define FCB_MODE       44      /* mode for which file was opened
  77.                                ** 000H - read
  78.                                ** 001H - write
  79.                                ** 002H - read/write
  80.                                ** status
  81.                                ** 080H - end-of-file
  82.                                ** 040H - last input character was CR
  83.                                ** 020H - last input character was LF
  84.                                */
  85. /* UNIX-like sgttyb structure */
  86. #define FCB_SGTTYB     45
  87. #define FCB_ISPEED     45      /* input speed
  88.                                */
  89. #define FCB_OSPEED     46      /* output speed
  90.                                */
  91. #define FCB_ERASE      47      /* backspace character
  92.                                */
  93. #define FCB_KILL       48      /* cancel line character
  94.                                */
  95. #define FCB_FLGS       49      /* flags -- 2 bytes
  96.                                ** 0FF00H - bits to control delays
  97.                                ** 00080H - even parity allowed on input
  98.                                ** 00040H - odd parity allowed on input
  99.                                ** 00020H - "raw" mode - wake up on all chars
  100.                                ** 00010H - map CR into LF, echo LF or CR as both
  101.                                ** 00008H - echo
  102.                                ** 00004H - map upper case to lower case (input)
  103.                                ** 00002H - return each char as typed
  104.                                ** 00001H - automatic flow control
  105.                                */
  106. #define FCB_IBUF       51      /* intermediate buffer
  107.                                */
  108. #define FCB_ISEG       53      /* segment of same (0 == DS)
  109.                                */
  110. #define FCB_IPTR       55      /* next byte in buffer
  111.                                */
  112. #define FCB_ICNT       57      /* # of bytes left
  113.                                */
  114.  
  115.